import request from "@/utils/request";

// 查询医师执业注册信息列表
export function listPhysician(query) {
  return request({
    url: "/zp/physician/list",
    method: "get",
    params: query,
  });
}

//验证医师情况
export function getPhysicianVerify(query) {
  return request({
    url: "/zp/physician/verify",
    method: "get",
    params: query,
  });
}

// 查询医师执业注册信息详细
export function getPhysician(id) {
  return request({
    url: "/zp/physician/" + id,
    method: "get",
  });
}

// 新增医师执业注册信息
export function addPhysician(data) {
  return request({
    url: "/zp/physician",
    method: "post",
    data: data,
  });
}

//更新执业证状态
export function physicianPrescriptionAuthUpdate(id) {
  return request({
    url: `/zp/physician/prescriptionAuth/${id}/updateCert`,
    method: "post",
  });
}

// 修改医师执业注册信息
export function updatePhysician(data) {
  return request({
    url: "/medical/physician",
    method: "put",
    data: data,
  });
}

// 删除医师执业注册信息
export function delPhysician(id) {
  return request({
    url: "/medical/physician/" + id,
    method: "delete",
  });
}
